VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 3  'UsesTransaction
END
Attribute VB_Name = "cLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Public Function autenticar(ByVal sUsuario As String, _
                            ByVal sPassWord As String, _
                            ByVal sDominio As String) As Boolean
  Dim lngError As Long
  Dim sError As String
  
  lngError = Logon(Trim$(sUsuario), Trim$(sDominio), Trim$(sPassWord), sError)
        
    If lngError = 0 Then
        autenticar = True 'MsgBox "The credentials are correct", vbInformation + vbOKOnly, "Result"
    Else
       autenticar = False 'MsgBox strError, vbExclamation + vbOKOnly, "Error"
    End If
 
End Function


    


